#ifndef DATE_H_
#define DATE_H_
#include <iostream>
using namespace std;

class Date{
private:
	int		year;
	int 	month;
	int 	day;
public:
	Date(int year, int month, int day);
	Date();
	//get
	int getYear() const { return this->year; }
	int getMonth() const { return this->month; }
	int getDay() const { return this->day; }

	//set
	//整月的天数
	int getMonthDay(int year, int month) const;
	//整年的天数
	int getYearDay(int year) const;
	//平润年的判断
	bool isLeap(int year) const;

	void display() const;	
	int operator - (const Date& rhs) const;
	const Date& operator ++ ();
	const Date operator++(int);

	const Date& operator -- ();
	const Date operator--(int);
};

ostream& operator << (ostream& out, const Date& d);

#endif
